package com.example.behaviour.responsibilityChain;

public class Client {

    public static void main(String[] args) {
        // 责任链串
        GatewayHandler gatewayHandler1 = new CurrentLimitHandler();
        GatewayHandler gatewayHandler2 = new BlacklistHandler();
        gatewayHandler1.setNextGatewayHandler(gatewayHandler2);
        GatewayHandler gatewayHandler3 = new ConversationHandler();
        gatewayHandler2.setNextGatewayHandler(gatewayHandler3);

        gatewayHandler1.service();

        // 可以使用数据库实现穿串
    }
}
